//
//  TabBarView.h
//  TabBarView
//
//  Created by HaiSheng on 15/8/8.
//  Copyright (c) 2015年 huanghaisheng. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TabBarItemView.h"


@protocol TabBarViewDelegate;

@interface TabBarView : UIView<TabBarItemViewDelegate>

@property (nonatomic, strong) NSArray *tabBarInfos;
@property (nonatomic, strong) UIImageView *topLineView;
@property (nonatomic, strong) TabBarItemView *selectedTabBarItem;
@property (nonatomic, assign) id<TabBarViewDelegate> delegate;
@property (nonatomic, assign) NSInteger selectedIndex;

- (id)initWithFrame:(CGRect)frame Items:(NSArray *)items BarStyle:(TabItemStyle)barStyle SelectedIndex:(NSInteger)selectedIndex;

- (void)setBarItemHighlightedAtIndex:(NSInteger)index;

- (void)clickAtIndex:(NSInteger)index;

@end


@protocol TabBarViewDelegate <NSObject>

@optional

- (void)tabBarView:(TabBarView *)view didSelectAtIndex:(NSInteger)index;
- (BOOL)tabBarView:(TabBarView *)view shouldSelectAtIndex:(NSInteger)index;


@end